<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="baidu-tc-cerfication" content="d0fcb6c290f799d6921e9a455bad9273">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <title>注单列表</title>
    <link href="__TEMPLATE__/sysme/css/game_mobile.css" rel="stylesheet" type="text/css" />
    <link href="__TEMPLATE__/mobile/index/css/betting.css" rel="stylesheet" type="text/css">
    
    <link rel="stylesheet" href="__TEMPLATE__/mobile/index/css/global.css" type="text/css">

	
    <script src="__TEMPLATE__/sysme/js/jquery-1.9.1.min.js"></script>
    <script type="text/javascript" src="/static/sysmet/lib/layer/2.4/layer.js"></script>
    <script src="__TEMPLATE__/sysme/js/jquery.mCustomScrollbar.concat.min.js"></script>
    <script type="text/javascript" src="__TEMPLATE__/sysme/js/scroll_common_mobile.js"></script>
    <script src="__TEMPLATE__/sysme/js/lobby_common_mobile.js"></script>

	<script src="__TEMPLATE__/sysme/js/getTime.js" type="text/javascript" charset="utf-8"></script>
	<link rel="stylesheet" type="text/css" href="__SYSMET__/lib/Hui-iconfont/1.0.8/iconfont.css" />
    <script src="__TEMPLATE__/sysme/js/tool_scroll_game.js"></script>
    <script type="text/javascript" src="__TEMPLATE__/mobile/index/js/betting.js"></script>
<!-- 	<script type="text/javascript" src="__TEMPLATE__/mobile/index/js/yaoyiyao.js"></script> -->
		<!-- UC强制全屏 -->  
 <meta name="full-screen" content="yes">  
 <!-- QQ强制全屏 -->  
 <meta name="x5-fullscreen" content="true">  
 <!-- UC应用模式-->  
 <meta name="browsermode" content="application">  
 <!-- QQ应用模式 -->  
 <meta name="x5-page-mode" content="app"> 
  </head>
    <style type="text/css">
    	#qiehuan_wanfa{
    		display: none;
    		position: fixed;
    		top: 0px;
    		left: 0px;
    		width: 100%;
    		height: 80px;
    		background-color: white;
   			z-index: 1;
    	}
    	#quan_wanfa{
    		display: none;
    	}
    	.lottery-list>ul>li{
    		float: left;
    		margin-top: 5px;
    		list-style-type:none;
    		/*width: 110px;*/
    		text-align: center;
    	}

    	.yiban{
		width: 96.5px;
		height:28px;
		background-color: white;
		/*z-index: 5;*/
		border:none;
		float: left;
	}
	.yiban_active{
		background-color: red;
		color: white;
	}
	

   </style>
   
    <style type="text/css">

      .m11{
        height: 28px;
        width: 100%;
        overflow: hidden;
        margin: 10px;
        position: relative;
      }
      .m10 {
        line-height: 28px;
        height: 45px;
        width: 82%;
        overflow: auto;
        background: #fff;
        white-space: nowrap;
        font-size: 14px;
      } 
      .m10 span{
      	display: inline-block;
      	width: 55px;
      	text-align: center;
      }
      .span_active{
      	color: white;
      	background-color: #e94335;
      	border-radius: 15px;
      }
      #cz_nr span{
      	display: inline-block;
      	width: 66px;
      	height: 30px;
      	text-align: center;
      	margin-left: 5%;
      	margin-top: 5%;
      	border: 1px solid #dedbd4;
      	font-size: 14px;
      	border-radius: 10px;
      	line-height: 30px;
      }
      .cz_nr_active{
      	border:1px solid #e94335 !important;
      	color: #e94335;
      }
      #cz_nr2 span{
      	display: inline-block;
      	width: 66px;
      	height: 30px;
      	text-align: center;
      	margin-left: 5%;
      	margin-top: 5%;
      	border: 1px solid #dedbd4;
      	font-size: 14px;
      	border-radius: 10px;
      	line-height: 30px;
      }
      .cz_nr{
		width: 100%;
		height: auto;
		background-color: #fafafa;
		display: none;
		padding-bottom:12px;
      }
      .cz_nr2{
		width: 100%;
		height: auto;
		background-color: #fafafa;
		display: none;
		padding-bottom:12px;
      }
      .centera_1>p{background: #f7f7f7;}
     .centera_1>p a{font-size:0.86rem;text-align: center;display: inline-block;height: 28px;line-height: 28px;width: 18.2%;border: 1px solid #ccc;border-radius: 3px;margin: 6px 2.5%;}
 			.hover{background: #ec0909;color:white !important;}
 			.tablea_1 .box_1{display: none;}
 			.tablea_1 .box_1 p{height: 35px;line-height: 35px;text-indent: 7px;}
 			.tablea_1 .box_1 div div a{text-align: center;display: inline-block;height: 28px;line-height: 28px;width: 23.2%;border: 1px solid #ccc;border-radius: 3px;margin: 6px 4.15%;}
 	 
    .zuijink{
    	background-color: #d91d36;
    	width: 90%;
    	margin: auto;
    	border-radius: 20px;
    }
    .zuijink2{
    	border-top: none;
    }
    .title-text{
    	font-size: 1rem;
    }
    .zhudan_header{
    	width: 25%;
      float:left;
    	/*border-right: 1px solid #ccc;*/
    
    	height: 100%;
    	font-size: 14px;
    	text-align: center;
    	line-height: 38px;
    }
    .zhudan_header_active{
    	color: #ec0909;
    	border-bottom: 2px solid #ec0909;
    }
    .zhudan_caizhong{
    	display: inline-block;
    	width: 80px;
    	height: 30px;
    	border: 1px solid #ccc;
    	border-radius: 5px;
    	font-size: 14px;
    	text-align: center;
    	line-height: 30px;
    	
    }
    .zhudan_caizhong_active{
    	color: #ec0909;
    	border: 1px solid #ec0909;
    }
    #tsk{width:200px;height:150px;display:none;background:#fff;position:absolute;top:200px;left:50%;margin-left:-100px;border-radius: 5px;text-align: center;font-size:14px;z-index: 1111;}
    #ts{width:60px;height:30px;position:absolute;bottom:10px;left:50%;margin-left:-25px;background:#e7aea6;line-height:30px;border-radius: 4px;color:#fff;z-index: 22222;}
    #tsk p{width:100%;height:70px;position:absolute;top:0;right:0;top:0;bottom:0;margin:auto;text-align: center;color:#f00;font-weight:bold;z-index: 111111;font-size:18px;}
    #data_shaixuan div{width:100%;height:40px;line-height:40px;border-bottom:1px solid #ccc;background:#fff;text-align: center;}
    </style>
  <body>
  	
    <input id="kehuduanxinx" value="2" type="hidden"> <!--定义为手机版-->
    <div id="sytsxx_ddsy"></div>
    <div class="title fud" style="background:#d91d36;height:44px;line-height:44px;">
    	<a href="javascript:;" style="display:block;float:left;margin-left:5px;" onclick="window.history.go(-1)"><i class="Hui-iconfont" style="font-size:25px;color:#fff;font-weight: 100;">&#xe6d4;</i></a>
		<div style="width: 250px; margin: 8px auto; position: absolute; left: 50%; height: 40px;margin-left:-75px;">
			<!--<p
				style="font-size: 12px;; line-height: 14px; width: 16px; float: left; height: 40px; font-weight: normal;">
				玩<br />法
			</p>-->
			<div id="qhczs_1" class="qhczs" style="float: left; font-size: 20px; border: 1px solid #FFFFFF; width: 134px; height: 29px; line-height: 25px; border-radius: 3px; font-weight: normal; position: relative; text-align: left; text-indent: 7px;">
				<span style="position: absolute; display: block; width: 0; height: 0; border-top: 8px solid #FFFFFF; border-left: 8px solid transparent; border-right: 8px solid transparent; border-bottom: 8px solid transparent; right: 5px; top: 11px;"></span>
				{if condition="$game neq 'all'"}{$tit.cp_name_new?$tit.cp_name_new:$tit.cp_name_old}{else/}全部彩种{/if}
			</div>
				<div style="float: right;font-weight: normal;line-height:27px;" class="data_sx"><span id="riqi">今天</span>&nbsp;<i class="Hui-iconfont">&#xe6d5;</i></div>
			<div class="clear"></div>
		</div>
   

   
	</div>

    <div class="qhcz_1 zhudanqbcz" style="position: fixed;height:100%; top: 0;left: 0;width: 100%;display: none;z-index: 99;">
		<div style="background-color: white;height: 300px;margin-top: 40px;padding-top: 40px;padding-left: 15px;">
		<a href="{:url('lottery/zhudan')}"><div class="zhudan_caizhong" style="margin-top: 10px;">全部彩种</div></a>
		{volist name="caizhong" id="item"}
			<a href="{:url('lottery/zhudan')}?game_id={$item.id}"><div class="zhudan_caizhong" style="margin-top: 10px;">{$item.cp_name_new ? $item.cp_name_new : $item.cp_name_old}</div></a>
		{/volist}
		</div>
		<div class="zhudan_zhezhao" style="height: 50%;background-color: black;opacity: 0.3;">
			
		</div>
		
		
    </div>
    
    
    
    <div style="background-color: #f5f5f9;width: 100%;position:fixed;top:44px;background:#fff;z-index: 10;">
    	<div class="zhudan_header1" style="width: 100%;height: 38px;background-color: white;">
    		<div class="zhudan_header zhudan_header_active quanbudingdan" data-type="all">全部订单</div>
    		<div class="zhudan_header yizhongjian" data-type="1">已中奖</div>
    		<div class="zhudan_header daikaijian" data-type="2">待开奖</div>
    		<div class="zhudan_header yichedan" data-type="3">追号订单</div>
    	</div>
  
  <!--全部订单-->
      
    </div>
    <div id="content" style="margin-top:80px;padding-bottom:40px;"></div>
   	<div class="menu" style="border-top: 2px solid #d8d8d8;box-shadow: 0 0 10px #d8d8d8; ">
    <ul>
        <!--首页-->
        <li><a class="menu-home" href="{:url('index/mhome')}"><img style="" src="__TEMPLATE__/mobile/index/img/nav_{if condition="$cur=='index'"}0{/if}1.png"></a></li>
        <!--购彩-->
        <li><a class="menu-color" href="{:url('bet/index')}"><img style="" src="__TEMPLATE__/mobile/index/img/nav_{if condition="$cur=='shop'"}0{/if}2.png"></a></li>
        <!--开奖-->
        <li><a class="menu-lot" href="{:url('lottery/index')}"><img style="" src="__TEMPLATE__/mobile/index/img/nav_{if condition="$cur=='lottery'"}0{/if}3.png"></a></li>
        <!--注单-->
        <li><a class="menu-news" href="{:url('lottery/zhudan')}"><img style="" src="__TEMPLATE__/mobile/index/img/nav_{if condition="$cur=='lottery_trend'"}0{/if}4.png"></a></li>
        <!--我的-->
        <li><a class="menu-my"  href="{:url('member/index')}"><img style=""src="__TEMPLATE__/mobile/index/img/nav_{if condition="$cur=='member'"}0{/if}5.png"></a></li>
    </ul>
</div>
<div id="tsk">
  <p id="tsy"></p>
    <div id="ts">确定</div>
</div>
<div id="data_shaixuan" style="width:100%;height:auto;bottom:0;background:#fff;z-index: 100;position:fixed;display:none;border-top:1px solid #ccc;">
			<div>今天</div>
			<div>昨天</div>
			<div>本周</div>
			<div>本月</div>
			<div>上月</div>
		</div>
		<div id="data_zhezhao" style="height: 100%;width:100%;position:fixed;display:none;background-color: black;opacity: 0.3;z-index:99;top:0;"></div>
<script>

		

var page = 1;
var type = '';
var stop = true;
function getData(type,tz_cd,page,day=''){
	var html = '';
	var game_id = '{$game}';
	var index = layer.load(1, {
		  shade: [0.1,'#000'] //0.1透明度的白色背景
		});
	$.get(
   		"{:url('Lottery/zhudanData')}",
   		{game_id:game_id,type:type,page:page,day:day},
   		function(v){
   			
   			if(v){
   				layer.close(index);
   				
   				//console.log(v)
   				$.each(v,function(i,data){
   	   				var name = data.cp_name_new ? data.cp_name_new : data.cp_name_old;
   	   	   			var color = data.zjje > 0 ? 'red' : '#999';
   	   	   			var kjxq = data.kjjg == 0 ? '待开奖' : (data.zjje > 0 ? '已中奖' : '未中奖');
   	   	   			/* if(tz_cd=='待开奖'){
   	   	   				
   	   	   					var dk_width='60%';
   	   	   				var dk_html='<div style="position:absolute;right:50%;margin-right:-46%;top:50%;margin-top:-15px;height:30px;width:60px;color:#666;line-height:30px;text-align:center;font-size:14px;border:1px solid #ccc;border-radius:5px;" id="'+data.uid+'" onclick="delete_czdd(this)">撤单</div>';
   	   	   			
   	   	   				
   	   	   			}else{
   	   	   				var dk_width='82%';
   	   	   				var dk_html=''
   	   	   			} */
   	   	   			var dk_width='82%';
	   				var dk_html=''
   	   				html += '<div class="qbdd" style="width: 100%;height: 72px;background-color: white;margin-top: 10px;padding-top: 10px; border-bottom:1px solid #ccc;display: block;position:relative;">';
   	   				html += '<a href="/mobile/member/touzhu?tzid='+data.uid+'&czid='+data.czid+'">';
   	   				html += '<img src="__TEMPLATE__/sysme/images/'+data.czid+'.png" width="40" height="40" style="margin-left: 12px;"/>';
   	   				html += '<p style="margin-left: 60px;margin-top: -46px;font-size: 0.975rem;color: black;width:'+dk_width+';">';
   	   				html += '<span>'+name+'</span>';
   	   				html += '<span style="float: right;margin-right: 10px;font-size: 0.875rem;color:'+color+';">'+kjxq+'</span></p>';
   	   				html += '<p style="margin-left: 60px;font-size: 0.875rem;color: #999;margin-top:3px;width:'+dk_width+';">';
   	   				html += '<span>第'+data.qihao+'期</span><span style="float: right;margin-right: 10px;">投注'+data.tzje+'元</span></p></a>';
   	   				html+=dk_html+'</div>'
   	   			});
   			}
// 			if(page > 1){
// 				console.log(page)
// 				if(html != ''){
					$("#content").append(html);
// 				}
// 			}else{
// 				$("#content").html(html);
// 			}
			
   		}
   	);
}
if($('.zhudan_header').css('borderBottom')=='2px solid #ec0909'){
		var tz_cd=$('.zhudan_header').html()
		var riqi=$('#riqi').html()
		getData('all',tz_cd,page,riqi);
}else{
	var tz_cd=''
	var riqi=$('#riqi').html()
	getData('all',tz_cd,page,riqi);
}

$('.data_sx').click(function(){
	$('#data_shaixuan').show()
	$('#data_zhezhao').show()
	
})
$('#data_zhezhao').click(function(){
	$('#data_shaixuan').hide()
	$('#data_zhezhao').hide()
})
$('#data_shaixuan div').click(function(){
	$("#content").html('');
	var riqi=$(this).html()
	$('#riqi').html(riqi)
	$('#data_shaixuan').hide()
	$('#data_zhezhao').hide()
	if($('.zhudan_header').css('borderBottom')=='2px solid #ec0909'){
		var tz_cd=$('.zhudan_header').html()
	}else{
		var tz_cd=''
	}
	page = 1;
	getData('all',tz_cd,page,riqi);
	$('.zhudan_header1').children('div').removeClass('zhudan_header_active')
	$('.zhudan_header1>div').eq(0).addClass('zhudan_header_active')
	
})

$('.zhudan_header1').children('div').click(function(){
  if($(this).hasClass('zhudan_header_active')){
		return false;
	}
	$(window).scrollTop(0)
	$(this).addClass('zhudan_header_active').siblings('div').removeClass('zhudan_header_active');
	day=$('#riqi').html()
	type = $(this).data('type');
	page = 1;
	var tz_cd=$(this).html()
	getData(type,tz_cd,page,day);
})
$(window).scroll(function () {
	if($(window).scrollTop()==($(document).height()-$(window).height()) && stop == true)//判断右边滑动条是否滑到最下
	{
		if($('.zhudan_header').css('borderBottom')=='2px solid #ec0909'){
			var tz_cd=$('.zhudan_header').html()
		}else{
			var tz_cd=''
		}
		var riqi=$('#riqi').html()
		stop = false;
		page++;
		getData(type,tz_cd,page,riqi);
		stop = true;
	}
});
$('.zhudan_header1').children('div').click(function(){
	$("#content").html('');
	if($(this).hasClass('zhudan_header_active')){
		return false;
	}
	//$(window).scrollTop(0)
	$(this).addClass('zhudan_header_active').siblings('div').removeClass('zhudan_header_active');
	type = $(this).data('type');
	page = 1;
	var tz_cd=$(this).html()
	var riqi=$('#riqi').html()
	getData(type,tz_cd,page,riqi);
	
})

function delete_czdd(odj){
	if(odj.innerHTML=='撤单中') return;
	odj.innerHTML='撤单中'
	var str = odj.id;
	$.ajax({
		type:"get",
		data:{'id':str},
		url:"/index/processing/colourfulWithdrawal",
		success:function(data){
			if(data==1){
				layer.msg('撤单成功')
				$('#'+odj.id).parent().remove()
			}else if(data==2){
				layer.msg('已封盘无法撤单')
				$('#'+odj.id).html('撤单')
			}else if(data==3){
				layer.msg('撤单失败')
				$('#'+odj.id).html('撤单')
			}
		}
	});
}


$('.qhczs').click(function(){
	$('.zhudanqbcz').toggle();
})

$('.zhudanqbcz').children('div').children('a').children('div').click(function(){
	$(this).addClass('zhudan_caizhong_active');
})

$('.zhudan_zhezhao').click(function(){
	$(".qhcz_1").css('display','none');
})
</script>
</body>
</html>
